home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / tydhtml / dyn.exe / CHAP11 / dyn11_3.txt < prev    next >
Encoding:
Text File  |  1997-10-02  |  3.1 KB  |  87 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4.  
  5. <FONT FACE="verdana,arial,helvetica" SIZE=2>
  6.  
  7. <TITLE>New England States</title>
  8.  
  9. </HEAD>
  10.  
  11. <BODY BGCOLOR="#FFFFFF">
  12.  
  13. <H2>NEW ENGLAND</H2>
  14.  
  15.  
  16.  
  17. <P>Click on a state <BR>
  18.  
  19. to see <BR>
  20.  
  21. its population <BR>
  22.  
  23. and area <BR>
  24.  
  25. information.</P>
  26.  
  27. <P>
  28.  
  29. <OBJECT ID="statelist"
  30.  
  31.         CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
  32.  
  33.         BORDER="0" WIDTH="0" HEIGHT="0">
  34.  
  35.   <PARAM NAME="DataURL" VALUE="newengld.txt">
  36.  
  37.   <PARAM NAME="UseHeader" VALUE="True">
  38.  
  39. </OBJECT>
  40.  
  41. <P>
  42.  
  43.  <IMG ID="Maine" STYLE="container:positioned;position:absolute;TOP:10pt;
  44.  
  45.   LEFT:300px;WIDTH:64px;HEIGHT:96px;ZINDEX:1;" src="Maine.jpg">
  46.  
  47.  <IMG ID="Vermont" STYLE="container:positioned;position:absolute;TOP:30pt;
  48.  
  49.   LEFT:240px;WIDTH:32px;HEIGHT:64px;ZINDEX:6;" src="Vermont.jpg">
  50.  
  51. <IMG ID="New Hampshire" STYLE="container:positioned;position:absolute;TOP:30pt;
  52.  
  53.   LEFT:270px;WIDTH:32px;HEIGHT:64px;ZINDEX:3;" src="New Hampshire.jpg">
  54.  
  55. <IMG ID="Massachusetts" STYLE="container:positioned;position:absolute;TOP:80pt;
  56.  
  57.   LEFT:230px;WIDTH:96px;HEIGHT:48px;ZINDEX:2;" src="Massachusetts.jpg">
  58.  
  59. <IMG ID="Connecticut" STYLE="container:positioned;position:absolute;TOP:100pt;
  60.  
  61.   LEFT:220px;WIDTH:64px;HEIGHT:32px;ZINDEX:4;" src="Connecticut.jpg">
  62.  
  63. <IMG ID="Rhode Island" STYLE="container:positioned;position:absolute;TOP:100pt;
  64.  
  65.   LEFT:270px;WIDTH:32px;HEIGHT:32px;ZINDEX:5;" src="Rhode Island.jpg">
  66.  
  67. <TABLE><TR><TD>
  68.  
  69. <IMG ID=Picture SRC="Maine.jpg" BORDER=4 HEIGHT=128 WIDTH=128 ALIGN=RIGHT>
  70.  
  71. </TD><TD>
  72.  
  73. <SPAN ID=state DATASRC=#statelist DATAFLD="State">
  74.  
  75. </SPAN>is the 
  76.  
  77. <SPAN ID=pr DATASRC=#statelist DATAFLD="Pop_Rank">
  78.  
  79. </SPAN> largest state in population in New England with
  80.  
  81. <SPAN ID=pop DATASRC=#statelist DATAFLD="Population">
  82.  
  83. </SPAN> people reported in the 1990 US Census.
  84.  
  85. <P>
  86.  
  87. <SPAN ID=state2 DATASRC=#statelist DATAFLD="State">
  88.  
  89. </SPAN> is the
  90.  
  91. <SPAN ID=ar DATASRC=#statelist DATAFLD="Area_Rank">
  92.  
  93. </SPAN> largest state in New England with
  94.  
  95. <SPAN ID=area DATASRC=#statelist DATAFLD="Area">
  96.  
  97. </SPAN> square kilometers.
  98.  
  99. </TD></TR></TABLE>
  100.  
  101. <SCRIPT language=JavaScript>
  102.  
  103. var srcElement
  104.  
  105. function documentClick() {
  106.  
  107.     srcElement = window.event.srcElement;
  108.  
  109.     if (srcElement.id=="Maine") {
  110.  
  111.        statelist.recordset.AbsolutePosition = 1;
  112.  
  113.     } else {
  114.  
  115.        if (srcElement.id=="Vermont") {
  116.  
  117.           statelist.recordset.AbsolutePosition = 2;
  118.  
  119.        } else {
  120.  
  121.           if (srcElement.id=="New Hampshire") {
  122.  
  123.              statelist.recordset.AbsolutePosition = 3;
  124.  
  125.           } else {
  126.  
  127.              if (srcElement.id=="Massachusetts") {
  128.  
  129.                 statelist.recordset.AbsolutePosition = 4;
  130.  
  131.              } else {
  132.  
  133.                 if (srcElement.id=="Rhode Island") {
  134.  
  135.                    statelist.recordset.AbsolutePosition = 5;
  136.  
  137.                 } else {
  138.  
  139.                    if (srcElement.id=="Connecticut") {
  140.  
  141.                       statelist.recordset.AbsolutePosition = 6;
  142.  
  143.                    }
  144.  
  145.                 }
  146.  
  147.              }
  148.  
  149.           }
  150.  
  151.        }
  152.  
  153.     }
  154.  
  155.     Picture.src = srcElement.id + ".jpg";
  156.  
  157. }
  158.  
  159.  
  160.  
  161. document.onclick = documentClick;
  162.  
  163.  
  164.  
  165. </SCRIPT>
  166.  
  167. </FONT>
  168.  
  169. </BODY>
  170.  
  171. </HTML>
  172.  
  173.